package com.qingsong.result;

import lombok.Getter;

/**
 * @author qingsong
 */
@Getter
public enum ResultCode {
    SUCCESS(200, "请求成功"),
    FAILED(500, "服务器错误"),
    BAD_PARAM(400, "请求参数有误"),
    VALIDATE_FAILED(403, "参数校验失败"),
    METHOD_NOT_ALLOW(405, "请求类型不匹配"),
    TOKEN_FAILED(1001, "Token过期或失效"),
    TOKEN_EXPIRING_SOON(1002, "Token即将过期");

    private final int CODE;
    private final String MESSAGE;

    ResultCode(int code, String msg) {
        this.CODE = code;
        this.MESSAGE = msg;
    }
}